const Handlers = require('./handlers')
const Joi = require('joi')

let internals = {}

internals.endpoints = [
  {
    method: 'GET',
    path: '/wechat/session/{code}',
    handler: Handlers.GetSession,
    config: {
      tags: ['api'],
      description: 'Get session by code',
      validate: {
        params: {
          code: Joi.string().required()
        },
      }
    }
  },
  {
    method: 'GET',
    path: '/wechat/get/{session3rd}',
    handler: Handlers.Get,
    config: {
      tags: ['api'],
      description: 'Check Session3rd',
      validate: {
        params: {
          session3rd: Joi.string().required()
        },
      }
    }
  },
];

module.exports = internals;
